export const formatterDate = (val: string) => {
    let newDateObj = new Date(val)
    let year = newDateObj.getFullYear()
    let month: string | number = newDateObj.getMonth() + 1
    let day: string | number = newDateObj.getDate()
    // let hh = newDateObj.getHours()
    // let mm = newDateObj.getMinutes()
    // let ss = newDateObj.getSeconds()
    month = month > 9 ? month : '0' + month
    day = day > 9 ? day : '0' + day
    return `${year}-${month}-${day}`
}